0c0892165d83a62816e816a986ef381a6bf430dc,xwiki-platform-web/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/client/plugin/image/ImageBehaviorAdjuster.java,ImageBehaviorAdjuster,onKeyPress,#Widget#char#number#,77

Before Change


    public void onKeyPress(Widget sender, char keyCode, int modifiers)
    {
        // Make sure the sender is the listened text area and an image is selected
        if (!(sender == textArea && textArea.getCommandManager().isExecuted(Command.INSERT_IMAGE))) {
            return;
        }
        // If it's a modified key (ctrl or alt), let it execute
        if (textArea.getCurrentEvent().getCtrlKey() || textArea.getCurrentEvent().getAltKey()) {
            return;
        }
        // If it's in the defined list of allowed keys, let it execute
        if (ALLOWED_KEYS.contains((int) keyCode)) {
            return;
        }
        // block everything else
        textArea.getCurrentEvent().xPreventDefault();
    }

    /**

After Change


    {
        // If we're blocking this key, prevent the default behavior for this key
        if (this.blocking) {
            textArea.getCurrentEvent().xPreventDefault();
        }
    }